package com.glb.gilibuy.web;

import com.glb.gilibuy.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @Description:
 * @Author: Yingtian qian
 * @Date: 2021/7/30 10:41
 */
public class BaseController {
    @Autowired
    public UserService userService;

    @Autowired
    public ProductService productService;

    @Autowired
    public ProductCategoryService productCategoryService;

    @Autowired
    public ProductDiscussionService productDiscussionService;

    @Autowired
    public OrderCommentService orderCommentService;

    @Autowired
    public CartService cartService;

    @Autowired
    public OrderService orderService;

    @Autowired
    public OrderItemService orderItemService;

    @Autowired
    public UserReceiveAddressService userReceiveAddressService;

    @Autowired
    public CyclePicService cyclePicService;

    @Autowired
    public AdminService adminService;

//    @Autowired
//    public OrderReturnApplyService orderReturnApplyService;
//
//    @Autowired
//    public FeedBackService feedBackService;

    @ExceptionHandler
    public String handleException(Exception exception) {
        exception.printStackTrace();
        //返回一个500.html，说明出现了意料之外的错误
        return "error/500";
    }
}
